﻿<controls:ChildWindow 
            xmlns:dataControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"  
            x:Class="SomethingSpacial.Views.Admin.LocationAdd"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:app="clr-namespace:SomethingSpacial.ControlDataProviders"
           xmlns:App="clr-namespace:SomethingSpacial.Web"
           Width="500" Height="550" 
           Title="Add a Location">
    <StackPanel x:Name="LayoutRoot" >

        <dataControls:DataForm x:Name="addDataForm"   AutoGenerateFields="False" AutoCommit="True" AutoEdit="True" CommandButtonsVisibility="None">
            <dataControls:DataForm.EditTemplate>
                <DataTemplate>
                    <StackPanel>
                        <dataControls:DataField Label="Location Name:" >
                            <TextBox Text="{Binding LocationName, Mode=TwoWay}"  Width="200" HorizontalAlignment="Left" />
                        </dataControls:DataField>
                        <dataControls:DataField Label="Street Address 1:">
                            <TextBox Text="{Binding  StreetAddress1, Mode=TwoWay}" Width="180" Height="120" HorizontalAlignment="Left"  TextWrapping="Wrap" />
                        </dataControls:DataField>
                        <dataControls:DataField Label="Street Address 2:">
                            <TextBox Text="{Binding StreetAddress2, Mode=TwoWay}" HorizontalAlignment="Left" Width="200"  />
                        </dataControls:DataField>
                        <dataControls:DataField Label="City:">
                            <TextBox Text="{Binding City, Mode=TwoWay}" HorizontalAlignment="Left" Width="200"  />
                        </dataControls:DataField>
                        <dataControls:DataField Label="State:">
                            <TextBox Text="{Binding State, Mode=TwoWay}" HorizontalAlignment="Left" Width="40"  />
                        </dataControls:DataField>
                        <dataControls:DataField Label="Country:">
                            <TextBox Text="{Binding Country, Mode=TwoWay}" HorizontalAlignment="Left"  Width="100" />
                        </dataControls:DataField>
                        <dataControls:DataField Label="Postal Code:">
                            <TextBox Text="{Binding PostalCode, Mode=TwoWay}" HorizontalAlignment="Left" Width="100"  />
                        </dataControls:DataField>
                        <dataControls:DataField Label="Lat Value:">
                            <TextBox Text="{Binding Lat, Mode=TwoWay}" HorizontalAlignment="Left"  Width="80" />
                        </dataControls:DataField>
                        <dataControls:DataField Label="Long Value:">
                            <TextBox Text="{Binding Long, Mode=TwoWay}" HorizontalAlignment="Left"  Width="80" />
                        </dataControls:DataField>
                    </StackPanel>
                </DataTemplate>
            </dataControls:DataForm.EditTemplate>
        </dataControls:DataForm>

        <StackPanel Orientation="Horizontal">
            <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75"  />
            <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23"/>
        </StackPanel>
                    
    </StackPanel>
</controls:ChildWindow>